<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>就业超市</title>
	<style>
		#form-wrap {
			width: 30%;
			margin: 20px auto;
		}

		button,
		input,
		select {
			padding: 10px 20px;
			width: 100%;
			box-sizing: border-box;
			border: 1px solid #ccc;
		}

		.input-wrap {
			margin-bottom: 20px;
		}

		.input-wrap:after {
			content: ' ';
			clear: both;
			display: block;
		}

		.left {
			padding-top: 10px;
			float: left;
			width: 35%;
		}

		.right {
			float: left;
			width: 65%;
		}

		.own_alert_div {
			display: none;
		}

		.logo_tab {
			height: 40px;
			line-height: 40px;
			border: 1px solid #ccc;
			margin-bottom: 10px;
		}

		.logo_tab a {
			float: left;
			width: 50%;
			text-align: center;
			text-decoration: none;
			color: #323232;
		}

		.logo_tab a.active {
			background-color: #ddd;
			/* color: #ffffff; */
		}

		.form_c {
			display: none;
		}
	</style>
</head>

<body>
	<div id="form-wrap">
		<div class="logo_tab" class="clearfix">
			<a href="javascript:void(0)" class="active">个人</a>
			<a href="javascript:void(0)">单位</a>
		</div>
		<form id="form1" action="" class="form_c" style="display:block" onsubmit="return false;">
			<div class="input-wrap" style="display: none">
				<div class="left">登录类型:</div>
				<div class="right">
					<input type="text" placeholder="登录类型" name="dllx" paramete="dllx" value="1">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">证件类型:</div>
				<div class="right">
					<input type="text" placeholder="证件类型" name="zjlx" paramete="zjlx" value="">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">身份证号码:</div>
				<div class="right">
					<!-- 342625197412031981 -->
					<input type="text" placeholder="身份证号码" name="sfzhm" paramete="sfzhm" value="342625197412031981">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">姓名:</div>
				<div class="right">
					<!-- 万长茹 -->
					<input type="text" placeholder="姓名" name="xm" paramete="xm" value="万长茹">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">联系电话:</div>
				<div class="right">
					<input type="text" placeholder="联系电话" name="lxdh" paramete="lxdh"  value="">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">用户ID:</div>
				<div class="right">
					<input type="text" placeholder="用户ID" name="userId" paramete="userId" value="">
				</div>
			</div>
			<button type="submit" id="btnLogin1" class="btnLogin">登录</button>
		</form>
		<form id="form2" action="" class="form_c" onsubmit="return false;">
				<div class="input-wrap" style="display: none">
						<div class="left">登录类型:</div>
						<div class="right">
							<input type="text" placeholder="登录类型" name="dllx" paramete="dllx" value="2">
						</div>
					</div>
			<div class="input-wrap">
				<div class="left">单位名称:</div>
				<div class="right">
					<!-- 北京双健塑料包装制品有限公司 -->
					<input type="text" placeholder="单位名称" name="dwmc" value="北京双健塑料包装制品有限公司" paramete="dwmc">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">单位ID:</div>
				<div class="right">
					<input type="text" placeholder="单位ID" name="dwid" paramete="dwid" value="">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">组织机构代码:</div>
				<div class="right">
					<!-- 911101137475439786 -->
					<input type="text" placeholder="组织机构代码" name="zzjgdm" paramete="zzjgdm" value="911101137475439786">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">统一社会信用代码:</div>
				<div class="right">
					<input type="text" placeholder="统一社会信用代码" name="tyshxydm" paramete="tyshxydm" value="">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">法人一证通Key:</div>
				<div class="right">
					<!-- 911101137475439786 -->
					<input type="text" placeholder="法人一证通Key" name="fryztKey" paramete="fryztKey" value="911101137475439786">
				</div>
			</div>
			<button type="submit" id="btnLogin2" class="btnLogin">登录</button>
		</form>
	</div>
	<script src="./common/vendor.js"></script>
	<script src="./common/common2.js"></script>
	<script>
		$(function () {
			$(document).on('click', '.logo_tab a', function () {
				$('.form_c').hide();
				$('.form_c').eq($(this).index()).show();
				$(this).addClass('active').siblings().removeClass('active');
			});
			$('#btnLogin1').click(function(event){
				event.preventDefault();
				_fetch($('#form1').getFormData())
			});
			$('#btnLogin2').click(function(event){
				event.preventDefault();
				_fetch($('#form2').getFormData())
			});
			function _fetch(data){
				sessionStorage.removeItem('dllx');
				$.fetch({
			    url: '/user/login',
			    type: 'post',
			    data:data
				}).done(function(res){
					if(res.returnData.executeResult == 1){
						window.location.href='./index.html'
					}
				});
			}
			// $('.form_c').attr('action', conf.urlPrefix + '/user/login');
			// $('#btnLogin').click(function (event) {
			//   event.preventDefault();
			//   $.fetch({
			//     url: '/login/login',
			//     type: 'post',
			//     data: {
			//       // a: $('#username').val(),
			// 			zzjgdm: $('#userpwd').val()
			// 			// b: $('#userid').val(),
			//       // zjlx: '01'
			//     }
			//   }).done(function (result){
			//     console.log(result)
			//     if (result.returnCode == '1') {
			//       // window.location.href = './yyfw/index.html';
			//     }
			//   });
			// });
		});
	</script>


</body>

</html>
